# CMake package configuration file for the @PROJECT_NAME@ module

@PACKAGE_GUARD@
@PACKAGE_INIT@

set(Sofa_VERSION @Sofa_VERSION@)
set(SOFA_USE_DEPENDENCY_PACK @SOFA_USE_DEPENDENCY_PACK@)

# Setup CMAKE_MODULE_PATH, CMAKE_PREFIX_PATH, CMAKE_INCLUDE_PATH
string(REGEX REPLACE "/lib/cmake/?.*" "" SOFA_ROOT "${CMAKE_CURRENT_LIST_DIR}")
list(APPEND CMAKE_MODULE_PATH  "${CMAKE_CURRENT_LIST_DIR}") # Needed to do: include(SofaMacros)
list(APPEND CMAKE_MODULE_PATH  "${SOFA_ROOT}/lib/cmake/Modules") # Needed to do: find_package(Eigen3)
if(SOFA_USE_DEPENDENCY_PACK)
    list(APPEND CMAKE_INCLUDE_PATH "${SOFA_ROOT}/include/extlibs/WinDepPack") # Needed to do: #include <zlib.h>
endif()
list(APPEND CMAKE_PREFIX_PATH  "${SOFA_ROOT}/plugins") # Needed to do: find_package(CImgPlugin)
list(APPEND CMAKE_PREFIX_PATH  "${SOFA_ROOT}/collections") # Needed to do: find_package(SofaComponentAll)

# Help RELOCATABLE plugins to resolve their dependencies.
# See SofaMacrosInstall.cmake for usage of this property.
define_property(TARGET
    PROPERTY "RELOCATABLE_INSTALL_DIR"
    BRIEF_DOCS "Install directory of RELOCATABLE target"
    FULL_DOCS "Install directory of RELOCATABLE target"
    )

include(CMakeDependentOption)
include(SofaMacros)

set(SOFA_WITH_OPENGL "@SOFA_WITH_OPENGL@")
if(SOFA_WITH_OPENGL)
    set(SOFA_NO_OPENGL FALSE) # Deprecated, use SOFA_WITH_OPENGL instead
else()
    set(SOFA_NO_OPENGL TRUE) # Deprecated, use SOFA_WITH_OPENGL instead
endif()

set(SOFA_WITH_DEVTOOLS "@SOFA_WITH_DEVTOOLS@")

if(NOT TARGET @PROJECT_NAME@)
    include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
endif()

check_required_components(@PROJECT_NAME@)
